import React, { Component } from 'react'
import { WhiteSpace } from 'antd-mobile'
import { IllegalInfo } from './'

export default class IllegalInfoList extends Component {
	constructor(props) {
		super(props);

		this.state = {};
	}

	render() {
		return (
			<div>
				{this.props.list.map((item, i) =>
					<div key={i}>
						<IllegalInfo {...item}/>
						{
							i<this.props.list.length-1 ? <WhiteSpace size="lg" /> : ""
						}
					</div>
				)}
			</div>
		)
	}
}

IllegalInfoList.defaultProps = {
	list: [
		{
			header: '粤A132KK,广东揭阳违章',
			body: ["违章时间：2014-12-24", "罚款本金¥300，办理服务费¥0（VIP减免18元）"],
			footer: '注：本违章扣分3分，扣分驾照为邱文标'
		},
		{
			header: '粤A132KK,广东广州违章',
			body: ["违章时间：2015-12-24", "罚款本金¥1200，办理服务费¥0（VIP减免18元）"],
			footer: '注：本违章扣分12分，扣分驾照为邱文标'
		}
	]
}